<template>
	<view>
		<view style="height: 200rpx;"></view>
		<c-scratch-card ref="cScratchCardRef" @open="onOpen" @ready="onReady">
			<view  style="display: flex;align-items: center;justify-content: center;width: 100%;height: 100%;">
				恭喜中奖 iPhone 15Pro MAx
			</view>
		</c-scratch-card>
		<view class="content">
			<view class="btnBox">
				<button @click="$refs.cScratchCardRef.init()" size="mini">重置</button>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				show:false
			};
		},
		methods:{
			onOpen(){
				console.log('图层已经刮开一半');
			},
			onReady(){
				console.log('ready');
			}
		}
	}
</script>

<style lang="scss">
.content{
		padding: 20rpx 14rpx;
		font-size: 28rpx;
	}
	.btnBox{
		width: 100%;
		display: flex;align-items: center;
		margin-top: 20rpx;
		margin-bottom: 30rpx;
	}
</style>
